package leetcode.code172;


public class Solution3 implements ISolution {

	public static void main(String[] args) {
		Solution3 so = new Solution3();
		for (int i = 1; i < 126; i++) {
			int num = so.trailingZeroes(i);
			if (num != 0)
				System.out.println(i + " 的阶乘结果有: " + num);
		}
	}

	@Override
	public int trailingZeroes(int n) {
		int count5 = 0;
		while (n != 0) {
			count5 += n / 5;
			n /= 5;
		}
		return count5;
	}

}
